<!--{include file='admin/public/header.html'}-->
<script>
function del(id){
	$.dialog.confirm('你确定要删除这个消息吗？', function(){
	    //$.dialog.tips('执行确定操作');
	    $.ajax({
			url:'<!--{U str="admin/link/del"}-->',
			type:'get',
			data:{id:id},
			success:function(data){
				if(data.result){
					//alert(reslut.tip);
					location.reload(); 
				}else{
					$.dialog.alert(data.data.reason);
				}
			}
		});
	}, function(){
	    $.dialog.tips('执行取消操作');
	});
}
</script>
     <div class="content">
        <div class="page-header">
          <h3 class="fl">管理友链</h3>
          <div class="user_message fr"><i class="icon-s-cog"></i>管理您的友情链接</div>
          <div class="cl"></div>
        </div>
        <div class="minbox">
        <form name="form1" method="post" action="">
        	<table class="table table-bordered table-striped">
            	<thead>
                	<tr>
                        <th width="5%" class="table-textcenter">ID</th>
                        <th>名称</th>
                        <th>地址</th>
                        <th width="5%" class="table-textcenter">类型</th>
                        <th width="10%" class="table-textcenter">点击数</th>
                        <th width="15%" class="table-textcenter">操作</th>
                  </tr>
                </thead>
                <tbody>
                    <!--{foreach from=$data key=k item=v}-->
            		<tr>
                        <td class="table-textcenter"><!--{$v.id}--></td>
                        <td><!--{$v.linkname}--></td>
                        <td><!--{$v.linkurl}--></td>
                        <td class="table-textcenter">
                        <!--{if $v.type ==1}-->
                        	文字
                        <!--{else}-->
                        	图片
                        <!--{/if}--></td>
                        <td><!--{$v.click}--></td>
                        <td class="table_config"> 
                        <a href="<!--{U str='admin/link/editLink' id=$v.id}-->">编辑</a>
                        <a href="javascript:;" onclick="del(<!--{$v.id}-->)">删除</a>
                        </td>
                	</tr>
                    <!--{/foreach}-->
                </tbody>
            </table>
            </form>
                <!--{$page}-->
        </div>
        <div class="copyright"></div>
 <!--{include file='admin/public/footer.html'}-->